﻿<controls:ChildWindow x:Class="Wintellect.Touch.Views.TouchChildWindow"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                      xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                      xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
                      xmlns:Touch="clr-namespace:Wintellect.Touch;assembly=Wintellect.Touch" 
                      Width="400" Height="300" 
                      Title="TouchChildWindow">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Ellipse Fill="Red" Width="100" Height="100">
                <Ellipse.RenderTransform>
                    <!--<TranslateTransform Y="-200"/>-->
                    <CompositeTransform TranslateY="0"/>
                </Ellipse.RenderTransform>

                <i:Interaction.Behaviors>
                    <Touch:Manipulate2DBehavior  
                    IsInertial="True"
                    ManipulationStarted="TouchShapeBehavior_ManipulationStarted" 
                    ManipulationDelta="TouchShapeBehavior_ManipulationDelta"
                    ManipulationCompleted="TouchShapeBehavior_ManipulationCompleted"/>
                </i:Interaction.Behaviors>
            </Ellipse>
        </Grid>

        <Button Grid.Row="1" Content="Close" HorizontalAlignment="Right" Padding="30,15" Click="HandleCloseButtonClick" />
    </Grid>
</controls:ChildWindow>